﻿CREATE TABLE [dbo].[tbl_city] (
    [id]           INT           NOT NULL,
    [id_region]    INT           NOT NULL,
    [id_country]   INT           NOT NULL,
    [oid]          INT           NOT NULL,
    [city_name_ru] VARCHAR (255) NULL,
    [city_name_en] VARCHAR (255) NOT NULL,
    CONSTRAINT [PK_tbl_city] PRIMARY KEY CLUSTERED ([id] ASC),
    CONSTRAINT [FK__tbl_city__id_cou__34C8D9D1] FOREIGN KEY ([id_country]) REFERENCES [dbo].[tbl_country] ([id]),
    CONSTRAINT [FK__tbl_city__id_reg__33D4B598] FOREIGN KEY ([id_region]) REFERENCES [dbo].[tbl_region] ([id])
);


GO
CREATE NONCLUSTERED INDEX [IX_FK__tbl_city__id_cou__34C8D9D1]
    ON [dbo].[tbl_city]([id_country] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_FK__tbl_city__id_reg__33D4B598]
    ON [dbo].[tbl_city]([id_region] ASC);

